home *** CD-ROM | disk | FTP | other *** search
- Mojo Development Environment for Java
-
-
- RELEASE 1.2 (EVALUATION COPY)
-
- NOTE: This version will expire in 30 days from installation.
- After which, certain features will be disabled, such
- as Saving.
-
- To order Mojo, visit http://www.PenumbraSoftware.com
- or call (770) 352-0100 (USA)
-
- ==================================================================
-
- Mojo is comprised of two elements: the Designer and the Coder.
-
- The Mojo Designer is designed for non-programmers who wish to enter the
- domain of Java programming with the smallest possible learning curve.
- From the outset novice users should be able to create simple
- functioning applets which can be run over the Internet or locally.
- However, Mojo differs from traditional drag-and-drop environments in
- that it also allows the novice user to progress and development more
- sophisticated applications and take advantage of the complete Java
- programming language.
-
- Although the emphasis is on non-programmers, experienced programmers
- will benefit from use of Mojo in its reuse of components and easy
- extensibility. Since the complete Java programming API is available for
- programmers, experienced programmers should not feel limited by the
- environment in the Coder.
-
- NOTE: Offline MS-Word Documents are available in the DOCS directory
- directly off the install path.
-
- Included are:
-
- Programmers Quickstart
- Inventory Demo (Complete Tutorial)
-
- --------------------------- Sample Applet -----------------------------
-
- 1. In the Designer, drop in a Button into the interface by Clicking
- on the button icon in the Component Palette at the top of the
- Designer. Then click in the Drawing Area to place it.
-
- ADDING A SOUND:
-
- Mojo incorporates a sophisticated means of allowing the user to incorporate
- functionality without touching a single line of code. This is accomplished
- using Actions. Actions can be dragged and dropped into any
- Component's Action list to allow a particular response to an Event.
- Events are things that happen to a component. For instance, one
- event is the Action event which occurs when a user clicks on a Button.
- In the following example, we will play a sound when the user clicks on
- a button.
-
- 2. From the "Window" menu, select "Available Actions".
- 3. Click on the Action tab at the bottom of the Selected Component
- window.
- 4. Select the Event Name to be "action" ( you will need to scroll down
- the list). NOTE: Buttons only respond to the action event in Java.
- 5. Drag the Play Sound task from the Task List to the Gray area of the
- Selected Component window. You will see the NO icon turn into a
- drop icon.
- 6. When the dialog box comes up asking for sound file name, click on
- specify file. Change directories into the "sounds" directory. We
- have provided you with a sampling of .au sounds. Select any of
- the sound files. You must use the Specify File button to specify
- sounds, as this will also copy the sound resources you select into
- the Output directory of your project.
-
- Some sample sounds are:
-
- bong.au
- gong.au
- bubble1.au
- dah.au
- space.au <-- this one plays a lot of music (try it)
- train.au
-
- 7. Click on Ok to process the Task.
-
-
- ADDING AN IMAGE:
-
- 8. Click the Properties tab of the Selected Component window to see the
- properties again.
- 9. Select the "Picture" component located in the "Standard" category.
- 10. Drop a Picture into the Screen by clicking in the drawing area.
- 11. Change the Filename property to one of the following by clicking on
- the Filename field of the properties box. You should see a button
- with three dots (...) appear. Click on that button and browse to
- the directory "images". You will find an assortment of images there.
- Select on of the images and click Ok.
-
- Some images provided are:
-
- penpag.gif
- gopag2.gif
- mojopag.gif
- javapag.gif
- blacbox.gif
-
- (for a complete listing see MOJO\images\*.gif)
-
-
- RUNNING THE APPLET:
-
- 12. "Run Applet" under the Project menu item in the main menu bar.
- (i.e. Project|Run Applet)
-
-
- PREVIEWING THE APPLET:
-
- 13. If you wish to view an applet which you have generated most recently,
- you should choose Project|Preview Applet.
-
- ANIMATIONS:
-
- 14. The Animation component found under the Animation tab allows you to
- incorporate .GIF animations into your project. After dropping
- in an animation into the Screen, you should specify the first frame
- of the Animation. For example, the waving Duke animation from Sun
- has frames Duke1, Duke2, Duke3, ...
-
- Click on the First Animation Frame property. You should see a button
- with an ellipses (three dots) appear.
-
- Click on the button and browse to the "images" sub-directory.
-
- Select Duke1.gif
-
- Click on Ok.
-
- Mojo will recognize how many frames of animations there are and
- load them accordingly. You will only see the first frame of the
- animation until you run the applet.
-
- Properties of Interest:
-
- First Animation Frame -- which animation to load. select the first
- frame which must be ?????1.gif
- All frames should be numbered sequentially
- starting from 1.
- Delay (in milliseconds) -- how long to wait between frames
-
-
- CODER: (Switch to the Coder by choosing Window|Coder)
-
- The Mojo Coder is the backend counter part to the Designer. It is
- arranged like a Smalltalk class browser.
-
- It consists of two hierarchies: a Class/Component hierarchy and a
- Project hierarchy. The Project hierarchy shows the current Applet
- being built and how it is organized. The Component hierarchy shows
- available classes and methods.
-
- SWITCHING BETWEEN HIERARCHY VIEWS:
-
- To see the Class Hierarchy, click on the tall skinny button found
- to the left of the Project Hierarchy with the ">" on it. This will
- slide out the Class Hierarchy. You should use this button to
- switch between both views.
-
- DRAG AND DROP INSTANTIATION:
-
- You can instantiate a class in the Coder by simply dragging a Component
- from the Class Hierarchy to the Project Hierachy. The currently
- selected component in the Project hierarchy serves as the parent
- of the newly added componet.
-
- OVERRIDING FUNCTIONS:
-
- Mojo provides an easy means of overriding functions. In the "Available
- Function" list of the Project, click with the RIGHT mouse button. Go
- down to "Override Function" and you will see a list of all inherited
- functions which you can then override. For methods, you will have to
- click on the Override Functions option to bring up the method browser
- since the list is normally too large for a popup menu.
-
- MOJO PARENT REFERENCE MODEL:
-
- Referencing components in Mojo is significantly easier than using
- pure Java. There are two primary keywords used for accessing
- parts of your applet:
-
- applet <-- currently running applet
- parent <-- parent of the object
-
- For instance to find out where the applet was started from, you could
- call:
-
- applet.getCodeBase();
-
- For the given hierarchy below, you can reference another components
- methods and instances variables using the parent-reference model:
-
- --+
- |
- +- Panel1
- |
- +- Button1
- |
- +- Button2
-
- In the action event of Button2, you can call the action event of
- the Button1 with:
-
- Button2:
- public boolean action(Event evt, Object what)
- {
- parent.Button1.action(evt, what);
-
- return(true);
- }
-
- Using parent, you are able to access all parts of the Project hierarchy.
-
- INITIALIZATIONS:
-
- Because of the nature of a visual environment, components which are
- drag-and-dropped in having implicit constructor calls.
-
- To preform initialization which must be run before your component
- will function properly, add in the method:
-
- void initialize()
-
- Common uses for the initialize method is to set initial values of
- instances variables.
-
- OUTPUT DIRECTORY:
-
- The default output directory is:
-
- MOJOBETA\myproject
-
- In that directory are the following files:
-
- Client.HTM <-- HTML File for bringing up applet
- Client.java <-- generated Java source
- *.class <-- generated class files
-
- FINAL NOTE:
-
- This README is not intended as a manual, please contact Penumbra Software,
- Inc. for more information on Mojo.
-
- They can be reached at:
-
- techsupport@penumbrasoftware.com (for registered users)
-
- or
-
- http://www.PenumbraSoftware.com
-
-